﻿using AutoMapper;
using BCEntity.OA.TeamWork.TeamWork;
using BCEntity.OA.TeamWork.TeamWorkAttachment;
using BCEntity.OA.TeamWork.TeamWorkCategory;
using BCEntity.OA.TeamWork.TeamWorkParticipant;
using BCEntity.OA.TeamWork.TeamWorkReply;
using BCDto.OA.TeamWork.TeamWork;
using BCDto.OA.TeamWork.TeamWorkAttachment;
using BCDto.OA.TeamWork.TeamWorkCategory;
using BCDto.OA.TeamWork.TeamWorkParticipant;
using BCDto.OA.TeamWork.TeamWorkReply;

namespace BCService.OA.TeamWork
{
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            //协同办公分类
            CreateMap<TeamWorkCategoryDto, TeamWorkCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkCategoryRequestDto, TeamWorkCategoryEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkCategoryEntity, TeamWorkCategoryDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //协同办公
            CreateMap<TeamWorkDto, TeamWorkEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkRequestDto, TeamWorkEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkEntity, TeamWorkDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkViewEntity, TeamWorkViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //协同办公附件
            CreateMap<TeamWorkAttachmentDto, TeamWorkAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkAttachmentRequestDto, TeamWorkAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkAttachmentEntity, TeamWorkAttachmentDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            
            //协同办公参与者
            CreateMap<TeamWorkParticipantDto, TeamWorkParticipantEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkParticipantRequestDto, TeamWorkParticipantEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkParticipantEntity, TeamWorkParticipantDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //协同办公回复
            CreateMap<TeamWorkReplyDto, TeamWorkReplyEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkReplyRequestDto, TeamWorkReplyEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TeamWorkReplyEntity, TeamWorkReplyDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
